package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * HomeNews entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Home_News", schema = "dbo", catalog = "StudentManager")
public class HomeNews implements java.io.Serializable {

	// Fields

	private Long newsId;
	private String newsTitle;
	private String newsContent;
	private Timestamp publishTime;
	private String publisher;

	// Constructors

	/** default constructor */
	public HomeNews() {
	}

	/** minimal constructor */
	public HomeNews(Long newsId, String newsTitle) {
		this.newsId = newsId;
		this.newsTitle = newsTitle;
	}

	/** full constructor */
	public HomeNews(Long newsId, String newsTitle, String newsContent,
			Timestamp publishTime, String publisher) {
		this.newsId = newsId;
		this.newsTitle = newsTitle;
		this.newsContent = newsContent;
		this.publishTime = publishTime;
		this.publisher = publisher;
	}

	// Property accessors
	@Id
	@Column(name = "News_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getNewsId() {
		return this.newsId;
	}

	public void setNewsId(Long newsId) {
		this.newsId = newsId;
	}

	@Column(name = "News_Title", nullable = false, length = 1)
	public String getNewsTitle() {
		return this.newsTitle;
	}

	public void setNewsTitle(String newsTitle) {
		this.newsTitle = newsTitle;
	}

	@Column(name = "News_Content")
	public String getNewsContent() {
		return this.newsContent;
	}

	public void setNewsContent(String newsContent) {
		this.newsContent = newsContent;
	}

	@Column(name = "PublishTime", length = 23)
	public Timestamp getPublishTime() {
		return this.publishTime;
	}

	public void setPublishTime(Timestamp publishTime) {
		this.publishTime = publishTime;
	}

	@Column(name = "Publisher", length = 20)
	public String getPublisher() {
		return this.publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

}